#stage1
FROM weiyun/daf-full-build:v1.0.1-oe_2203 as builder

COPY wf /build/
COPY mavlink /usr/

RUN cd /build/ && rm -rf build && mkdir build && cd build && cmake ../cmake -DOE=1 && make -j 8

#stage2
FROM weiyun/daf-base:v1.0.1-oe_2203
COPY mavlink /usr/

COPY --from=builder /build/build/bin/ /app/
COPY --from=builder /build/thing/ /app/thing/

WORKDIR /app/

ENTRYPOINT [ "./docker-entrypoint.sh" ]